import requests

class wy_music:

    url = 'https://m10.music.126.net/20241012132646/6b8b5cd447e4b4553d9b9a8930149d7a/yyaac/obj/wonDkMOGw6XDiTHCmMOi/14052039430/3821/4f58/6c99/6af13d65f095a7e51bcebddf9cc5a9d8.m4a'
    headers = {
        "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36"
    }

    @classmethod
    def download(cls):
        resp = requests.get(cls.url, headers=cls.headers)
        with open('zyntm.mp3', 'wb') as f:
            f.write(resp.content)

if __name__ == '__main__':

    wy_music.download()

# 外链
# "http://music.163.com/#/song?id={}".format(mp3Id)
# 需要登录才能抓到包  params被加密需要逆向
